import torch

from ai import AiConstant
from ai.utils import utils_file

OUTPUT_DIR = AiConstant.OUTPUT_PATH + 'TTS_tacochon2/'
LOG_FILE_PATH = AiConstant.LOG_PATH + 'tts/tts_tacochon2.log'

for file in [OUTPUT_DIR]:
    utils_file.makedir_for_file_or_dir(file)

logger = AiConstant.AI_LOGGER(log_file_path=LOG_FILE_PATH)


def get_logger():
    return logger


class Params:
    def __init__(self):
        self.weight_decay = None
        self.learning_rate = None
        self.seed = None
        self.mel_fmax = None
        self.mel_fmin = None
        self.filter_length = None
        self.win_length = None
        self.hop_length = None
        self.load_mel_from_disk = None
        self.sampling_rate = None
        self.max_wav_value = None
        self.text_cleaners = None
        self.distributed_run = None
        self.validation_files = None
        self.training_files = None
        self.dist_url = None
        self.dist_backend = None
        self.attention_location_kernel_size = None
        self.attention_location_n_filters = None
        self.attention_dim = None
        self.p_decoder_dropout = None
        self.p_attention_dropout = None
        self.gate_threshold = None
        self.max_decoder_steps = None
        self.prenet_dim = None
        self.decoder_rnn_dim = None
        self.attention_rnn_dim = None
        self.encoder_embedding_dim = None
        self.encode_kernel_size = None
        self.encode_embedding_dim = None
        self.encode_n_convolutions = None
        self.symbols_embedding_dim = None
        self.n_symbols = None
        self.n_frames_per_step = None
        self.n_mel_channels = None
        self.fp16_run = None
        self.mask_padding = None
        self.batch_size = 256
        self.epochs = 15
        self.lr = 1e-3
        self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
        self.model_name = 'Tacochon2'
